package com.xmtlxx.tms.domain.bo;

import com.xmtlxx.common.core.domain.BaseEntity;
import com.xmtlxx.common.core.validate.AddGroup;
import com.xmtlxx.common.core.validate.EditGroup;
import com.xmtlxx.tms.domain.vo.ScheduleDtlVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 车次业务对象 t_schedule
 *
 * @author xmtlxx
 * @date 2022-08-15
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("车次业务对象")
public class ScheduleBo extends BaseEntity {

    /**
     * 车次ID
     */
    @ApiModelProperty(value = "车次ID")
    private String id;

    /**
     * 承运商ID
     */
    @ApiModelProperty(value = "承运商ID", required = true)
    @NotBlank(message = "承运商ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String carrierId;

    /**
     * 部门ID
     */
    @ApiModelProperty(value = "部门ID", required = true)
    @NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 车次名称
     */
    @ApiModelProperty(value = "车次名称", required = true)
    @NotBlank(message = "车次名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 日期
     */
    @ApiModelProperty(value = "日期", required = true)
    @NotNull(message = "日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date day;

    /**
     * 线路ID
     */
    @ApiModelProperty(value = "线路ID", required = true)
    @NotBlank(message = "线路ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String lineId;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private String status;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String memo;

    /**
     * 接单量
     */
    @ApiModelProperty(value = "接单量", required = true)
    @NotNull(message = "接单量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long nums;

    /**
     * 已接单
     */
    @ApiModelProperty(value = "已接单")
    private Long takes;

    /**
     * 进行中
     */
    @ApiModelProperty(value = "进行中")
    private Long durings;

    /**
     * 已完成
     */
    @ApiModelProperty(value = "已完成")
    private Long finishes;

    /**
     * 异常数
     */
    @ApiModelProperty(value = "异常数")
    private Long errors;

    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识")
    private String delFlag;


    private List<ScheduleDtlVo> items;

    private List<String> dateList;

    private List<String>  weeks;

    /**
     * 当前时间
     */
    private Date afterDay;
}
